FROM {{ namespace }}/{{ image_prefix }}vitrage-base:{{ tag }}
LABEL maintainer="{{ maintainer }}" name="{{ image_name }}" build-date="{{ build_date }}"

{% block vitrage_ml_header %}{% endblock %}

{% import "macros.j2" as macros with context %}

{% if install_type == 'binary' %}

    {% if base_distro in ['centos', 'oraclelinux', 'rhel'] %}

        {% set vitrage_ml_packages = [
            'openstack-vitrage-ml'
        ] %}

{{ macros.install_packages(vitrage_ml_packages | customizable("packages")) }}

    {% elif base_distro in ['debian', 'ubuntu'] %}

RUN echo '{{ install_type }} not yet available for {{ base_distro }}' \
    && /bin/false

    {% endif %}

{% endif %}

{% block vitrage_ml_footer %}{% endblock %}
{% block footer %}{% endblock %}

USER vitrage
